<template>
    <!--住房补助标准-->
    <div class="contents">
        <div class="title"> {{ datas.title.title }}</div>
        <div class="message">
            <span class="titleName">{{ datas.title.department }}</span>
            <span>{{ datas.title.date }}</span>
        </div>
        <div class="keyPoint" v-for="(item,index) in datas.contents" :key="index">
            <div>
                {{ item.keyPoint }}
            </div>
            <div class="keyDetail" v-for="(itemDetail,index) in item.detailsKeyPoints" :key="index">
                <p>{{itemDetail.point }}</p>
            </div>
        </div>
    </div>
</template>

<script>
//mock数据真实服务注释删除
import datas from '../../mock/businesstrip/businesstripdetail';
export default {
    data() {
        return {
            datas
        }
    },
    created() {
        window.HWH5.setNavigationBarTitle({ title: this.$t('navTitle')  });
        // 真实请求服务方法
        // const userId = this.$store.state.userInfo.userId
        // this.getDatas(userId)
    },
    mounted() {
    },
    methods: {
        // 获取服务接口数据
        // getDatas(userId) {
        //   真实接口服务请求 需要将userInfo中的id作为参数传进去做数据请求
        //   const url = 'https://xxx?userId' + userId;
        //   const _headers = {
        //     'Content-Type': 'application/json'
        //   };
        //   HWH5.fetchInternet(url, {
        //     method: 'get',
        //     headers: _headers
        //   })
        //     .then(res => {
        //       res.json().then(reply => {
        //           //将接口返回数据赋值给热服务
        //           this.datas = reply
        //       });
        //     })
        //     .catch(error => {
        //       console.log('请求异常', error);
        //     });
        // }
    }
}
</script>

<style lang="less" scoped>
.contents {
    box-sizing: border-box;
    background: #fff;
    padding: 12px 16px;
    margin-top: 10px;
    height: 560px;
    .title {
        font-family: PingFangSC-Regular;
        font-size: 16px;
        color: #000000;
        letter-spacing: 0;
        margin-bottom: 4px;
    }
    .message {
        font-family: PingFangSC-Regular;
        font-size: 12px;
        color: #999999;
        letter-spacing: 0;
        margin-bottom: 16px;
        .titleName {
            margin-right:12px;
        }
    }
    .keyPoint {
        font-family: PingFangSC-Regular;
        font-size: 14px;
        color: #666666;
        letter-spacing: 0;
        margin-bottom: 8px;
    }
}
</style>